home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 April / macformat-049.iso / mac / Shareware Plus / Developers / dropg++ / usr / include / scripts / stats < prev    next >
Encoding:
Text File  |  1997-02-20  |  376 b   |  20 lines  |  [TEXT/R*ch]

  1. #    @(#)stats    8.1 (Berkeley) 6/10/93
  2. #
  3. # disk statistics
  4.  
  5. define dstat
  6.     set $op=(struct sdop *)&($arg0[$arg2])
  7.     set $i=$arg1
  8.     while ($i) 
  9.         printf "$arg3 "
  10.         printf "%d %d 0x%x 0x%x %d", $op->bp, $op->bufsize, $op->blkno, $op->when.tv_sec, $op->when.tv_usec
  11.         if ($op->op & 1)
  12.             printf " READ\n"
  13.         else
  14.             printf " WRITE\n"
  15.         end
  16.         set $op = $op + 1
  17.         set $i = $i - 1
  18.     end
  19. end
  20.